home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sacred & Secular
/
Sacred and Secular.iso
/
pc
/
movies
/
shared.dir
/
05027_Script_5027
< prev
next >
Wrap
Text File
|
1996-04-03
|
3KB
|
140 lines
on setQTVol n, chan
if voidP(chan) then set chan = 48
if isQTPlaying(chan) then
set the volume of sprite chan = n
end if
end
on isQTPlaying chan
if voidP(chan) then set chan = 48
if the type of sprite chan = 16 and the castNum of sprite chan <> 0 then
if the puppet of sprite chan then
if the stopTime of sprite chan > the movieTime of sprite chan then
return 1
end if
end if
end if
return 0
end
on isOrWasQTPlaying chan
if voidP(chan) then set chan = 48
if the type of sprite chan = 16 and the castNum of sprite chan <> 0 then
if the puppet of sprite chan then
return 1
end if
end if
return 0
end
on getgQTCastNum chan
if voidP(chan) then set chan = 48
if the type of sprite chan = 16 and the castNum of sprite chan <> 0 then
if the puppet of sprite chan then
return the castNum of sprite chan
end if
end if
return 0
end
on getgQTNum chan
if voidP(chan) then set chan = 48
set cn = getgQTCastNum(chan)
if cn = 0 then return -1
set n = the fileName of cast cn
set l = length(n)
return integer(char (l-5) to (l-4) of n)
end
on stopQTSound
--put ">>> stopQTSound"
if isOrWasQTPlaying() then
set the movierate of sprite 48 = 0
set the castNum of sprite 48 = 0
puppetSprite 48, 0
--updateStage
end if
end stopQTSound
on pauseQTSound
global gQTPause, gQTName, gQTCastNum
--put ">>> pauseQTSound"
if isQTPlaying() then
--put ">>> qt was paused"
set gQTPause = the movieTime of sprite 48
set the movierate of sprite 48 = 0
set gQTName = the fileName of cast gQTCastNum
set the castNum of sprite 48 = 0
--updateStage
else
set gQTPause = -1
end if
end pauseQTSound
on unPauseQTSound
global gQTPause, gQTName, gQTCastNum, gVolume
--put ">>> unPauseQTSound"
if gQTName = the fileName of cast gQTCastNum and gQTPause <> -1 then
--put ">>> qt was unpaused at " & gQTPause
puppetSprite 48,1
set the type of sprite 48 = 16
set the castNum of sprite 48 = gQTCastNum
updateStage
set the movieTime of sprite 48 = gQTPause
setQTVol(gVolume)
set the movierate of sprite 48 = 1
--updateStage
set gQTPause = -1
return 1
end if
set gQTPause = -1
return 0
end unPauseQTSound
on playQTSound sndFileName
global gQTCastNum, gVolume
puppetSprite 48,1
set gQTCastNum = 4863 -- the number of cast "TEMPLATE.MOV"
set the fileName of cast gQTCastNum = sndFileName
--
--
-- Check to see if we are really UNPAUSING...
--
if unPauseQTSound() then exit
set the castNum of sprite 48 = gQTCastNum
set the type of sprite 48 = 16
updateStage
setQTVol(gVolume)
set the movieRate of sprite 48 = 1
end